    .then(g)
    .then(logIdentity)

Promise.resolve(1)
    .then(x => g(f(x)))
    .then(logIdentity)